# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=gf2x
pkgver=1.3.0
pkgrel=2
pkgdesc='A library for multiplying polynomials over the binary field'
arch=(loong64 x86_64)
url='https://gitlab.inria.fr/gf2x/gf2x'
license=(GPL LGPL)
depends=(glibc)
source=(https://gitlab.inria.fr/gf2x/gf2x/uploads/c46b1047ba841c20d1225ae73ad6e4cd/gf2x-$pkgver.tar.gz)
sha256sums=('9472cd651972a1de38e3c4c47697a86e0ecf19d7d33454d4bc2a62bc85841b59')

build() {
  cd gf2x-$pkgver
  ./configure --prefix=/usr --enable-sse2 --disable-pclmul CFLAGS="$CFLAGS -msse2"
  make
}

check() {
  cd gf2x-$pkgver
  make -k check
}

package() {
  cd gf2x-$pkgver
  make prefix="$pkgdir"/usr install
}
